﻿<%@ WebHandler Language="C#" Class="Tags" %>

using System;
using System.Web;
using BusinessObjects.BO_GetObjects;
using System.Data;
using System.Text;

public class Tags : IHttpHandler {

    public void ProcessRequest(HttpContext context) {
        string prefixText = context.Request.QueryString["q"];
        if (prefixText == null)
            prefixText = "a";
        StringBuilder sb = new StringBuilder();
        DataTable objDT = BO_portal_tags.SelectAdmin(prefixText, 1, 10, 1);
        foreach (DataRow drow in objDT.Rows) {
            sb.Append(drow["TAG_NAME"]).Append(Environment.NewLine);
        }
        context.Response.Write(sb.ToString());
    }

    public bool IsReusable {
        get {
            return false;
        }
    }
}